package com.utils;

public class HttpServerUtils {

    public static final String tokenKey = "Authorization"; //请求头认证
    public static final String bearer = "Bearer "; //替换值 (如果 token 开头包含才行，生成 token 可能有概率一样)

    public static String parseAuthorization(String authorization) {
        String result = authorization;
        if (authorization != null && authorization.length() > bearer.length() && authorization.substring(0, bearer.length()).equals(bearer)) {
            result = authorization.replace(bearer, "");
        }
        return result;
    }

}
